//
//  HEMyOrderDetailsHeadCell.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/6.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEMyOrderDetailsHeadCell.h"

@interface HEMyOrderDetailsHeadCell ()

@property (nonatomic, strong) UILabel *titleLb;

@end

@implementation HEMyOrderDetailsHeadCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
     if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
         self.selectionStyle = UITableViewCellSelectionStyleNone;
         [self initUI];
     }
     return self;;
}

- (void)initUI {
    
    _titleLb = [UILabel new];
    _titleLb.font = DYBlodFont(18);
    _titleLb.text = @"订单信息";
    _titleLb.textColor = CNavLightBlackColor;
    [self.contentView addSubview:_titleLb];
    
    UIView *headLine = [UIView new];
    headLine.backgroundColor = CSplitLineColor;
    [self.contentView addSubview:headLine];
    
    [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).mas_offset(10);
        make.left.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(self.contentView).mas_offset(-15);
    }];
    [_titleLb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];

    [headLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_titleLb.mas_bottom).mas_offset(10);
        make.height.mas_offset(1);
        make.left.equalTo(_titleLb);
        make.right.equalTo(_titleLb);
        make.bottom.equalTo(self.contentView).mas_offset(-5);
    }];
}

- (void)refreshContent:(GDFiterCellModel *)fiterModel formModel:(GDFormModel *)formModel indexPath:(NSIndexPath *)indexPath {
    
    _titleLb.text = fiterModel.leftTitle;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
